#!/bin/sh

#
# This script installs the Google App Engine Testing artifacts into you local Maven repository.
#
# If you would like to avoid the need for this step, ask Google by voting for the following issue:
#   http://code.google.com/p/googleappengine/issues/detail?id=2507 
#


if [ "$1" == "" ]
then
    echo "usage: $0 </path/to/appengine-java-sdk> <version>"
    exit 1
fi

if [ "$2" == "" ]
then
    echo "usage: $0 </path/to/appengine-java-sdk> <version>"
    exit 1
fi


GAE_SDK_PATH=$1

gaev=$2

# appengine-api
mvn install:install-file -Dfile=$GAE_SDK_PATH/lib/impl/appengine-api.jar -DgroupId=com.google.appengine -DartifactId=appengine-api -Dversion=$gaev -DgeneratePom=true -Dpackaging=jar

# appengine-api-labs
mvn install:install-file -Dfile=$GAE_SDK_PATH/lib/impl/appengine-api-labs.jar -DgroupId=com.google.appengine -DartifactId=appengine-api-labs -Dversion=$gaev -DgeneratePom=true -Dpackaging=jar

# appengine-api-stubs
mvn install:install-file -Dfile=$GAE_SDK_PATH/lib/impl/appengine-api-stubs.jar -DgroupId=com.google.appengine -DartifactId=appengine-api-stubs -Dversion=$gaev -DgeneratePom=true -Dpackaging=jar

# appengine-testing
mvn install:install-file -Dfile=$GAE_SDK_PATH/lib/testing/appengine-testing.jar -DgroupId=com.google.appengine -DartifactId=appengine-testing -Dversion=$gaev -DgeneratePom=true -Dpackaging=jar
